package 力扣日常刷题.木22二月.第01天206;


import 力扣日常刷题.TreeNode;

/**
 * @author 帅小伙
 * @date 2022/2/6
 * @description
 */
public class Demo10JZ二叉树镜像 {

    public TreeNode mirrorTree(TreeNode root){
        if(root == null)return root;
        TreeNode left = mirrorTree(root.left);
        TreeNode right = mirrorTree(root.right);
        root.left = right;
        root.right = left;
        return root;
    }

}
